package cn.ywsj.ywsjmidtier.service;

import cn.ywsj.ywsjmidtier.common.Connect;
import com.alibaba.fastjson.JSONObject;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.util.MultiValueMap;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

import javax.servlet.http.HttpServletRequest;

@Api(tags = "收货地址")
@FeignClient(url = Connect.XSX_URL,name = "xsx")
public interface WechatGoodsReceiptAddressFeign {
    /**
     * 地址管理列表
     * @param start
     * @param pageSize
     * @return
     */
    @ApiOperation("地址管理列表")
    @PostMapping("/wechat/member/addressmgr/ajaxgoodsaddresslist")
    String ajaxgoodsaddresslist(@RequestParam("jsonObject")JSONObject jsonObject, @RequestParam("start") Integer start, @RequestParam("pageSize") Integer pageSize);

    /**
     * 新增地址
     * @param jsonObject
     * @param result
     * @return
     */
    @ApiOperation("新增地址")
    @PostMapping("/wechat/member/addressmgr/ajaxaddaddress")
    String ajaxaddaddress(@RequestParam("jsonObject")JSONObject jsonObject,@RequestParam("result") BindingResult result);

    /**
     * 修改地址
     * @param jsonObject
     * @param result
     * @return
     */
    @ApiOperation("修改地址")
    @PostMapping("/wechat/member/addressmgr/ajaxupdateaddress")
    String ajaxupdateaddress(@RequestParam("jsonObject")JSONObject jsonObject,@RequestParam("result") BindingResult result);

    /**
     * 删除地址
     * @param jsonObject
     * @param request
     * @return
     */
    @ApiOperation("删除地址")
    @PostMapping("/wechat/member/addressmgr/ajaxdeleteaddress")
    String ajaxdeleteaddress(@RequestParam("jsonObject")JSONObject jsonObject,@RequestParam("request") HttpServletRequest request);
}
